package thread.shengchanxiaofei;


import java.io.File;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.SynchronousQueue;

public class Starter {
    public static final int BOUND = 1;
    public static void main(String[] args) throws InterruptedException{
        BlockingQueue<File> blockingQueue = new SynchronousQueue<File>();
        File file = new File("E:\\BaiduYunDownload");
        Crawler c1 = new Crawler(blockingQueue,file);
        Indexer indexer = new Indexer(blockingQueue);
        Thread t1 = new Thread(c1);
        Thread t2 = new Thread(indexer);
        t1.start();
        t2.start();
        t1.join();
        t2.join();
    }

}